Skip to contentSkip to conversation

waf.bbclass: check that waf exists before trying to execute it

PATCH In review Martin Jansa 4 participants 14 messages Jan 30, 2018 – Jan 31, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 waf.bbclass: check that waf exists before trying to execute it

* there are some recipes like jack and other which inherit waf-samba which inherits waf, but they don't use waf for configure, strange isn't it?

* fixes:
WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 do_configure: Unable to execute waf --version, exit code 1. Assuming waf version without bindir/libdir support.
WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

---
 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/waf.bbclass +3 -0
index c3e744e5de..eec4d9496d 100644
@@ -29,6 +29,9 @@ python waf_preconfigure() {
     from distutils.version import StrictVersion
     srcsubdir = d.getVar('S')
     wafbin = os.path.join(srcsubdir, 'waf')
+    if not os.path.isfile(wafbin):
+        bb.note("%s doesn't exist, cannot check whether it supports --bindir/--libdir" % wafbin)
+        return
     status, result = oe.utils.getstatusoutput(wafbin + " --version")
     if status != 0:
         bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % status)
Signature · 1 line
2.15.1
#1 lore raw

Why would they do that? Shouldn't it be a fatal bug if waf isn't found?

Quoted 51 lines · Martin Jansa

* there are some recipes like jack and other which inherit waf-samba which inherits waf, but they don't use waf for configure, strange isn't it?

* fixes:
WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 do_configure: Unable to execute waf --version, exit code 1. Assuming waf version without bindir/libdir support.
WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

---
 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/waf.bbclass +3 -1
index c3e744e5de..eec4d9496d 100644
@@ -29,6 +29,9 @@ python waf_preconfigure() {
     from distutils.version import StrictVersion
     srcsubdir = d.getVar('S')
     wafbin = os.path.join(srcsubdir, 'waf')
+    if not os.path.isfile(wafbin):
+        bb.note("%s doesn't exist, cannot check whether it supports
--bindir/--libdir" % wafbin)
+        return
     status, result = oe.utils.getstatusoutput(wafbin + " --version")
     if status != 0:
         bb.warn("Unable to execute waf --version, exit code %d. Assuming

waf version without bindir/libdir support." % status) --
2.15.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw

+Andreas who added waf inherit in jack in:
commit 0f8f1973e229a0799098bc2334416fec8c608b50

Author: Andreas Müller <[email protected]>
Date:   Sat Oct 8 12:03:32 2016 +0200

jack: swap to jack2

+Bian who added waf samba in:
commit 962e346df99696a10657a2ea7b2166dfaf290289

Author: Bian Naimeng <[email protected]>
Date:   Tue Jun 16 14:18:25 2015 +0900

waf-samba: add new class

waf-samba is a build system used by samba related software

+Joe and Joe and who maintains samba and related recipes + meta-networking

Quoted 57 lines · Ross

Why would they do that? Shouldn't it be a fatal bug if waf isn't found?

Quoted 51 lines · Martin Jansa

* there are some recipes like jack and other which inherit waf-samba which inherits waf, but they don't use waf for configure, strange isn't it?

* fixes:
WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 do_configure: Unable to execute waf --version, exit code 1. Assuming waf version without bindir/libdir support.
WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

---
 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/waf.bbclass +3 -1
index c3e744e5de..eec4d9496d 100644
@@ -29,6 +29,9 @@ python waf_preconfigure() {
     from distutils.version import StrictVersion
     srcsubdir = d.getVar('S')
     wafbin = os.path.join(srcsubdir, 'waf')
+    if not os.path.isfile(wafbin):
+        bb.note("%s doesn't exist, cannot check whether it supports
--bindir/--libdir" % wafbin)
+        return
     status, result = oe.utils.getstatusoutput(wafbin + " --version")
     if status != 0:
         bb.warn("Unable to execute waf --version, exit code %d. Assuming

waf version without bindir/libdir support." % status) --
2.15.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw
Quoted 7 lines · Martin Jansa

+Andreas who added waf inherit in jack in:commit
0f8f1973e229a0799098bc2334416fec8c608b50

Author: Andreas Müller <[email protected]>
Date:   Sat Oct 8 12:03:32 2016 +0200

jack: swap to jack2

Quoted 8 lines

+Bian who added waf samba in:
commit 962e346df99696a10657a2ea7b2166dfaf290289

Author: Bian Naimeng <[email protected]>
Date:   Tue Jun 16 14:18:25 2015 +0900

waf-samba: add new class

waf-samba is a build system used by samba related software

waf-samba looks very special purpose and not how I would expect a normal waf workflow to work at all.... maybe it shouldn't inherit from waf.bbclass, especially since all it is actually using is get_waf_parallel_make() ?

Quoted 108 lines

+Joe and Joe and who maintains samba and related recipes + meta- networking

Quoted 102 lines · Ross

Why would they do that? Shouldn't it be a fatal bug if waf isn't found?

Quoted 98 lines · Martin Jansa

* there are some recipes like jack and other which inherit waf- samba

which inherits waf, but they don't use waf for configure, strange isn't

it?

* fixes:

WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf -- version, exit code 127. Assuming waf version without bindir/libdir support.

WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf -- version, exit code 127. Assuming waf version without bindir/libdir support.

WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir

support.

WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 do_configure:
Unable to execute waf --version, exit code 1. Assuming waf version without bindir/libdir support.

WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf -- version, exit code 127. Assuming waf version without bindir/libdir support.

---

 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/waf.bbclass +0 -0

index c3e744e5de..eec4d9496d 100644

--- a/meta/classes/waf.bbclass

+++ b/meta/classes/waf.bbclass

meta/classes/waf.bbclass +2 -0
@@ -29,6 +29,9 @@ python waf_preconfigure() {
 
     from distutils.version import StrictVersion
 
     srcsubdir = d.getVar('S')
 
     wafbin = os.path.join(srcsubdir, 'waf')
 
+    if not os.path.isfile(wafbin):
 
+        bb.note("%s doesn't exist, cannot check whether it

supports --bindir/--libdir" % wafbin)

+ return

status, result = oe.utils.getstatusoutput(wafbin + " --
version")

if status != 0:

bb.warn("Unable to execute waf --version, exit code %d.
Assuming waf version without bindir/libdir support." % status)

--

2.15.1

--

_______________________________________________

Openembedded-core mailing list

[email protected]

http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw
In reply to Martin Jansa
Quoted 7 lines · Martin Jansa

+Andreas who added waf inherit in jack in:
commit 0f8f1973e229a0799098bc2334416fec8c608b50

Author: Andreas Müller <[email protected]>
Date:   Sat Oct 8 12:03:32 2016 +0200

jack: swap to jack2

As far as I can see is jack2 configured with waf. Don't remember why I chose waf-samba. Because I am on business trip I cannot take care before next week.

Andreas

Quoted 74 lines

+Bian who added waf samba in:
commit 962e346df99696a10657a2ea7b2166dfaf290289

Author: Bian Naimeng <[email protected]>
Date:   Tue Jun 16 14:18:25 2015 +0900

waf-samba: add new class

waf-samba is a build system used by samba related software

+Joe and Joe and who maintains samba and related recipes + meta-networking

Quoted 57 lines · Ross

Why would they do that? Shouldn't it be a fatal bug if waf isn't found?

Quoted 51 lines · Martin Jansa

* there are some recipes like jack and other which inherit waf-samba which inherits waf, but they don't use waf for configure, strange isn't it?

* fixes:
WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 do_configure: Unable to execute waf --version, exit code 1. Assuming waf version without bindir/libdir support.
WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

---
 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/waf.bbclass +3 -1
index c3e744e5de..eec4d9496d 100644
@@ -29,6 +29,9 @@ python waf_preconfigure() {
     from distutils.version import StrictVersion
     srcsubdir = d.getVar('S')
     wafbin = os.path.join(srcsubdir, 'waf')
+    if not os.path.isfile(wafbin):
+        bb.note("%s doesn't exist, cannot check whether it supports
--bindir/--libdir" % wafbin)
+        return
     status, result = oe.utils.getstatusoutput(wafbin + " --version")
     if status != 0:
         bb.warn("Unable to execute waf --version, exit code %d.

Assuming waf version without bindir/libdir support." % status) --
2.15.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#5 lore raw

Thanks Andreas,

jack is the only one which inherits waf directly not through waf-samba.

More surprisingly it also has ${S}/waf it seems:
https://github.com/jackaudio/jack2/blob/c1647819eed6d11f94b21981d9c869629299f357/waf

So the WARNING: shown for jack probably had different reason than the rest of them and that is:

jack/1.9.12-r0 $ jack/1.9.12-r0/git/waf --version
Error: run waf-light from a folder containing waflib

it doesn't like running waf from outside ${S} and waf_preconfigure is executed from ${TOPDIR} before do_configure switches to ${S}

I don't know how common this situation is, if all waf scripts are like that, this one (after "cd ../jack/1.9.12-r0/git") says:
waf 1.8.17 (cd7579a727d1b390bf9cbf111c1b20e811370bc0)

so I'll leave that to original author to figure it out, I don't use waf anywhere, so I cannot properly test the use case he was trying to fix.

Regards,

Quoted 94 lines · Andreas Müller
Quoted 7 lines · Martin Jansa

+Andreas who added waf inherit in jack in:
commit 0f8f1973e229a0799098bc2334416fec8c608b50

Author: Andreas Müller <[email protected]>
Date:   Sat Oct 8 12:03:32 2016 +0200

jack: swap to jack2

As far as I can see is jack2 configured with waf. Don't remember why I chose waf-samba. Because I am on business trip I cannot take care before next week.

Andreas

Quoted 77 lines

+Bian who added waf samba in:
commit 962e346df99696a10657a2ea7b2166dfaf290289

Author: Bian Naimeng <[email protected]>
Date:   Tue Jun 16 14:18:25 2015 +0900

waf-samba: add new class

waf-samba is a build system used by samba related software

+Joe and Joe and who maintains samba and related recipes + meta-networking

Quoted 60 lines · Ross

Why would they do that? Shouldn't it be a fatal bug if waf isn't found?

Quoted 53 lines · Martin Jansa

* there are some recipes like jack and other which inherit waf-samba which inherits waf, but they don't use waf for configure, strange isn't it?

* fixes:
WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 do_configure: Unable to execute waf --version, exit code 1. Assuming waf version without bindir/libdir support.
WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

---
 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/waf.bbclass +3 -1
index c3e744e5de..eec4d9496d 100644
@@ -29,6 +29,9 @@ python waf_preconfigure() {
     from distutils.version import StrictVersion
     srcsubdir = d.getVar('S')
     wafbin = os.path.join(srcsubdir, 'waf')
+    if not os.path.isfile(wafbin):
+        bb.note("%s doesn't exist, cannot check whether it supports
--bindir/--libdir" % wafbin)
+        return
     status, result = oe.utils.getstatusoutput(wafbin + " --version")
     if status != 0:
         bb.warn("Unable to execute waf --version, exit code %d.

Assuming waf version without bindir/libdir support." % status) --
2.15.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#6 lore raw

+Stefan

Quoted 128 lines · Martin Jansa

Thanks Andreas,

jack is the only one which inherits waf directly not through waf-samba.

More surprisingly it also has ${S}/waf it seems:
https://github.com/jackaudio/jack2/blob/c1647819eed6d11f94b21981d9c869
629299f357/waf

So the WARNING: shown for jack probably had different reason than the rest of them and that is:

jack/1.9.12-r0 $ jack/1.9.12-r0/git/waf --version
Error: run waf-light from a folder containing waflib

it doesn't like running waf from outside ${S} and waf_preconfigure is executed from ${TOPDIR} before do_configure switches to ${S}

I don't know how common this situation is, if all waf scripts are like that, this one (after "cd ../jack/1.9.12-r0/git") says:
waf 1.8.17 (cd7579a727d1b390bf9cbf111c1b20e811370bc0)

so I'll leave that to original author to figure it out, I don't use waf anywhere, so I cannot properly test the use case he was trying to fix.

Regards,

Quoted 96 lines · Andreas Müller
Quoted 7 lines · Martin Jansa

+Andreas who added waf inherit in jack in:
commit 0f8f1973e229a0799098bc2334416fec8c608b50

Author: Andreas Müller <[email protected]>
Date:   Sat Oct 8 12:03:32 2016 +0200

jack: swap to jack2

As far as I can see is jack2 configured with waf. Don't remember why I chose waf-samba. Because I am on business trip I cannot take care before next week.

Andreas

Quoted 78 lines

+Bian who added waf samba in:
commit 962e346df99696a10657a2ea7b2166dfaf290289

Author: Bian Naimeng <[email protected]>
Date:   Tue Jun 16 14:18:25 2015 +0900

waf-samba: add new class

waf-samba is a build system used by samba related software

+Joe and Joe and who maintains samba and related recipes + meta-networking

Quoted 60 lines · Ross

Why would they do that? Shouldn't it be a fatal bug if waf isn't found?

Quoted 53 lines · Martin Jansa

* there are some recipes like jack and other which inherit waf-samba which inherits waf, but they don't use waf for configure, strange isn't it?

* fixes:
WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 do_configure: Unable to execute waf --version, exit code 1. Assuming waf version without bindir/libdir support.
WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

---
 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/waf.bbclass +3 -1
index c3e744e5de..eec4d9496d 100644
@@ -29,6 +29,9 @@ python waf_preconfigure() {
     from distutils.version import StrictVersion
     srcsubdir = d.getVar('S')
     wafbin = os.path.join(srcsubdir, 'waf')
+    if not os.path.isfile(wafbin):
+        bb.note("%s doesn't exist, cannot check whether it supports
--bindir/--libdir" % wafbin)
+        return
     status, result = oe.utils.getstatusoutput(wafbin + " --version")
     if status != 0:
         bb.warn("Unable to execute waf --version, exit code %d.

Assuming waf version without bindir/libdir support." % status) --
2.15.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#7 lore raw

On Jan 30, 2018 17:40, "Martin Jansa" <[email protected]> wrote:

+Stefan

Quoted 17 lines · Martin Jansa

Thanks Andreas,

jack is the only one which inherits waf directly not through waf-samba.

More surprisingly it also has ${S}/waf it seems:
https://github.com/jackaudio/jack2/blob/c1647819eed6d11f94b2
1981d9c869629299f357/waf

So the WARNING: shown for jack probably had different reason than the rest of them and that is:

jack/1.9.12-r0 $ jack/1.9.12-r0/git/waf --version
Error: run waf-light from a folder containing waflib

it doesn't like running waf from outside ${S} and waf_preconfigure is executed from ${TOPDIR} before do_configure switches to ${S}

Quoted 9 lines

I don't know how common this situation is, if all waf scripts are like that, this one (after "cd ../jack/1.9.12-r0/git") says:
waf 1.8.17 (cd7579a727d1b390bf9cbf111c1b20e811370bc0)

so I'll leave that to original author to figure it out, I don't use waf anywhere, so I cannot properly test the use case he was trying to fix.

Regards,

I have a lot of waf builds, I'll test them with the latest waf.bbclass tomorrow.

Quoted 92 lines
Quoted 87 lines · Andreas Müller
Quoted 7 lines · Martin Jansa

+Andreas who added waf inherit in jack in:
commit 0f8f1973e229a0799098bc2334416fec8c608b50

Author: Andreas Müller <[email protected]>
Date:   Sat Oct 8 12:03:32 2016 +0200

jack: swap to jack2

As far as I can see is jack2 configured with waf. Don't remember why I chose waf-samba. Because I am on business trip I cannot take care before next week.

Andreas

Quoted 69 lines

+Bian who added waf samba in:
commit 962e346df99696a10657a2ea7b2166dfaf290289

Author: Bian Naimeng <[email protected]>
Date:   Tue Jun 16 14:18:25 2015 +0900

waf-samba: add new class

waf-samba is a build system used by samba related software

+Joe and Joe and who maintains samba and related recipes + meta-networking

Quoted 52 lines · Ross

Why would they do that? Shouldn't it be a fatal bug if waf isn't found?

Quoted 47 lines · Martin Jansa

* there are some recipes like jack and other which inherit waf-samba which inherits waf, but they don't use waf for configure, strange isn't it?

* fixes:
WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 do_configure: Unable to execute waf --version, exit code 1. Assuming waf version without bindir/libdir support.
WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

---
 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/waf.bbclass +3 -1
index c3e744e5de..eec4d9496d 100644
@@ -29,6 +29,9 @@ python waf_preconfigure() {
     from distutils.version import StrictVersion
     srcsubdir = d.getVar('S')
     wafbin = os.path.join(srcsubdir, 'waf')
+    if not os.path.isfile(wafbin):
+        bb.note("%s doesn't exist, cannot check whether it supports
--bindir/--libdir" % wafbin)
+        return
     status, result = oe.utils.getstatusoutput(wafbin + " --version")
     if status != 0:
         bb.warn("Unable to execute waf --version, exit code %d.

Assuming waf version without bindir/libdir support." % status) --
2.15.1

Quoted 10 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 6 lines

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw
In reply to Martin Jansa

Sorry, I wasn't sure if I should make my patch in-reply-to this thread....
I think I fixed this correctly in http://lists.openembedded.org/piperma
il/openembedded-core/2018-January/147041.html
Thanks,Joshua Watt

Quoted 172 lines · Martin Jansa

+Stefan

Quoted 168 lines · Martin Jansa

Thanks Andreas,
jack is the only one which inherits waf directly not through waf- samba.

More surprisingly it also has ${S}/waf it seems:
https://github.com/jackaudio/jack2/blob/c1647819eed6d11f94b21981d9c
869629299f357/waf

So the WARNING: shown for jack probably had different reason than the rest of them and that is:

jack/1.9.12-r0 $ jack/1.9.12-r0/git/waf --version
Error: run waf-light from a folder containing waflib

it doesn't like running waf from outside ${S} and waf_preconfigure is executed from ${TOPDIR} before do_configure switches to ${S}

I don't know how common this situation is, if all waf scripts are like that, this one (after "cd ../jack/1.9.12-r0/git") says:
waf 1.8.17 (cd7579a727d1b390bf9cbf111c1b20e811370bc0)

so I'll leave that to original author to figure it out, I don't use waf anywhere, so I cannot properly test the use case he was trying to fix.

Regards,

Quoted 135 lines · Andreas Müller
Quoted 6 lines · Martin Jansa

+Andreas who added waf inherit in jack in:commit
0f8f1973e229a0799098bc2334416fec8c608b50

Author: Andreas Müller <[email protected]>
Date:   Sat Oct 8 12:03:32 2016 +0200

jack: swap to jack2

As far as I can see is jack2 configured with waf. Don't remember why I chose waf-samba. Because I am on business trip I cannot take care before next week.

Andreas

Quoted 122 lines

+Bian who added waf samba in:
commit 962e346df99696a10657a2ea7b2166dfaf290289

Author: Bian Naimeng <[email protected]>
Date:   Tue Jun 16 14:18:25 2015 +0900

waf-samba: add new class

waf-samba is a build system used by samba related software

+Joe and Joe and who maintains samba and related recipes + meta-networking

Quoted 105 lines · Ross

Why would they do that? Shouldn't it be a fatal bug if waf isn't found?

Quoted 101 lines · Martin Jansa

* there are some recipes like jack and other which inherit waf-samba

which inherits waf, but they don't use waf for configure, strange isn't

it?

* fixes:

WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir

support.

WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 do_configure:
Unable to execute waf --version, exit code 1. Assuming waf version without bindir/libdir support.

WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

---

 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/waf.bbclass +0 -0

index c3e744e5de..eec4d9496d 100644

--- a/meta/classes/waf.bbclass

+++ b/meta/classes/waf.bbclass

meta/classes/waf.bbclass +2 -0
@@ -29,6 +29,9 @@ python waf_preconfigure() {
 
     from distutils.version import StrictVersion
 
     srcsubdir = d.getVar('S')
 
     wafbin = os.path.join(srcsubdir, 'waf')
 
+    if not os.path.isfile(wafbin):
 
+        bb.note("%s doesn't exist, cannot check whether it

supports --bindir/--libdir" % wafbin)

+ return

status, result = oe.utils.getstatusoutput(wafbin + "
--version")

     if status != 0:

         bb.warn("Unable to execute waf --version, exit

code %d. Assuming waf version without bindir/libdir support." % status)

--

2.15.1

--

_______________________________________________

Openembedded-core mailing list

[email protected]

http://lists.openembedded.org/mailman/listinfo/openembedded
-core

#9 lore raw

What about the recipes which don't have ${S}/waf at all (and might inherit waf from possibly wrong reasons), like all those waf-samba recipes mentioned before?

Quoted 140 lines · Joshua Watt

Sorry, I wasn't sure if I should make my patch in-reply-to this thread....

I think I fixed this correctly in http://lists.openembedded.org/
pipermail/openembedded-core/2018-January/147041.html

Thanks,
Joshua Watt

On Wed, 2018-01-31 at 00:39 +0100, Martin Jansa wrote:

+Stefan

On Wed, Jan 31, 2018 at 12:38 AM, Martin Jansa <[email protected]> wrote:

Thanks Andreas,

jack is the only one which inherits waf directly not through waf-samba.

More surprisingly it also has ${S}/waf it seems:
https://github.com/jackaudio/jack2/blob/c1647819eed6d11f94b2
1981d9c869629299f357/waf

So the WARNING: shown for jack probably had different reason than the rest of them and that is:

jack/1.9.12-r0 $ jack/1.9.12-r0/git/waf --version
Error: run waf-light from a folder containing waflib

it doesn't like running waf from outside ${S} and waf_preconfigure is executed from ${TOPDIR} before do_configure switches to ${S}

I don't know how common this situation is, if all waf scripts are like that, this one (after "cd ../jack/1.9.12-r0/git") says:
waf 1.8.17 (cd7579a727d1b390bf9cbf111c1b20e811370bc0)

so I'll leave that to original author to figure it out, I don't use waf anywhere, so I cannot properly test the use case he was trying to fix.

Regards,

On Tue, Jan 30, 2018 at 11:41 PM, Andreas Müller <[email protected]> wrote:

On Tuesday, January 30, 2018, Martin Jansa <[email protected]> wrote:

+Andreas who added waf inherit in jack in:
commit 0f8f1973e229a0799098bc2334416fec8c608b50

Author: Andreas Müller <[email protected]>
Date:   Sat Oct 8 12:03:32 2016 +0200

jack: swap to jack2

As far as I can see is jack2 configured with waf. Don't remember why I chose waf-samba. Because I am on business trip I cannot take care before next week.

Andreas

+Bian who added waf samba in:
commit 962e346df99696a10657a2ea7b2166dfaf290289

Author: Bian Naimeng <[email protected]>
Date:   Tue Jun 16 14:18:25 2015 +0900

waf-samba: add new class

waf-samba is a build system used by samba related software

+Joe and Joe and who maintains samba and related recipes + meta-networking

On Tue, Jan 30, 2018 at 1:03 PM, Burton, Ross <[email protected]> wrote:

Why would they do that? Shouldn't it be a fatal bug if waf isn't found?

On 30 January 2018 at 08:30, Martin Jansa <[email protected]> wrote:

* there are some recipes like jack and other which inherit waf-samba which inherits waf, but they don't use waf for configure, strange isn't it?

* fixes:
WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0 do_configure: Unable to execute waf --version, exit code 1. Assuming waf version without bindir/libdir support.
WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.
WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

---
 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/waf.bbclass +3 -1
index c3e744e5de..eec4d9496d 100644
@@ -29,6 +29,9 @@ python waf_preconfigure() {
     from distutils.version import StrictVersion
     srcsubdir = d.getVar('S')
     wafbin = os.path.join(srcsubdir, 'waf')
+    if not os.path.isfile(wafbin):
+        bb.note("%s doesn't exist, cannot check whether it supports
--bindir/--libdir" % wafbin)
+        return
     status, result = oe.utils.getstatusoutput(wafbin + " --version")
     if status != 0:
         bb.warn("Unable to execute waf --version, exit code %d. Assuming

waf version without bindir/libdir support." % status) --
2.15.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#10 lore raw
Quoted 3 lines · Martin Jansa

What about the recipes which don't have ${S}/waf at all (and might inherit waf from possibly wrong reasons), like all those waf-samba recipes mentioned before?

Ya, sorry I should have clarified: This should fix it for recipes that only include waf.bbclass (e.g. jack and my local waf recipes that were also getting the same error). I still think that perhaps waf- samba.bbclass probably shouldn't be inheriting from waf.bbclass if the intent is that those projects doesn't actually have ${S}/waf.... but to be fair I haven't looked closely at the recipes that inherit waf- samba.bbclass.

Quoted 188 lines
Quoted 186 lines · Joshua Watt

Sorry, I wasn't sure if I should make my patch in-reply-to this thread....

I think I fixed this correctly in http://lists.openembedded.org/pip
ermail/openembedded-core/2018-January/147041.html

Thanks,
Joshua Watt

Quoted 176 lines · Martin Jansa

+Stefan

Quoted 172 lines · Martin Jansa

Thanks Andreas,
jack is the only one which inherits waf directly not through waf-samba.

More surprisingly it also has ${S}/waf it seems:
https://github.com/jackaudio/jack2/blob/c1647819eed6d11f94b2198
1d9c869629299f357/waf

So the WARNING: shown for jack probably had different reason than the rest of them and that is:

jack/1.9.12-r0 $ jack/1.9.12-r0/git/waf --version
Error: run waf-light from a folder containing waflib

it doesn't like running waf from outside ${S} and waf_preconfigure is executed from ${TOPDIR} before do_configure switches to ${S}

I don't know how common this situation is, if all waf scripts are like that, this one (after "cd ../jack/1.9.12-r0/git") says:
waf 1.8.17 (cd7579a727d1b390bf9cbf111c1b20e811370bc0)

so I'll leave that to original author to figure it out, I don't use waf anywhere, so I cannot properly test the use case he was trying to fix.

Regards,

Quoted 137 lines · Andreas Müller
Quoted 6 lines · Martin Jansa

+Andreas who added waf inherit in jack in:commit
0f8f1973e229a0799098bc2334416fec8c608b50

Author: Andreas Müller <[email protected]>
Date:   Sat Oct 8 12:03:32 2016 +0200

jack: swap to jack2

As far as I can see is jack2 configured with waf. Don't remember why I chose waf-samba. Because I am on business trip I cannot take care before next week.

Andreas

Quoted 124 lines

+Bian who added waf samba in:
commit 962e346df99696a10657a2ea7b2166dfaf290289

Author: Bian Naimeng <[email protected]>
Date:   Tue Jun 16 14:18:25 2015 +0900

waf-samba: add new class

waf-samba is a build system used by samba related
software

+Joe and Joe and who maintains samba and related recipes + meta-networking

Quoted 106 lines · Ross

Why would they do that? Shouldn't it be a fatal bug if waf isn't found?

Quoted 102 lines · Martin Jansa

* there are some recipes like jack and other which inherit waf-samba

which inherits waf, but they don't use waf for configure, strange isn't

it?

* fixes:

WARNING: libldb-1.1.29-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

WARNING: samba-4.6.7-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

WARNING: libtalloc-2.1.9-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir

support.

WARNING: jack-1.9.10+gitAUTOINC+2d1d323505-r0
do_configure: Unable to execute waf --version, exit code 1. Assuming waf version without bindir/libdir support.

WARNING: libtevent-0.9.31-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

WARNING: libtdb-1.3.14-r0 do_configure: Unable to execute waf --version, exit code 127. Assuming waf version without bindir/libdir support.

---

 meta/classes/waf.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/waf.bbclass +0 -0

index c3e744e5de..eec4d9496d 100644

--- a/meta/classes/waf.bbclass

+++ b/meta/classes/waf.bbclass

meta/classes/waf.bbclass +2 -0
@@ -29,6 +29,9 @@ python waf_preconfigure() {
 
     from distutils.version import StrictVersion
 
     srcsubdir = d.getVar('S')
 
     wafbin = os.path.join(srcsubdir, 'waf')
 
+    if not os.path.isfile(wafbin):
 
+        bb.note("%s doesn't exist, cannot check

whether it supports --bindir/--libdir" % wafbin)

+ return

status, result = oe.utils.getstatusoutput(wafbin +
" --version")

     if status != 0:

         bb.warn("Unable to execute waf --version, exit

code %d. Assuming waf version without bindir/libdir support." % status)

--

2.15.1

--

_______________________________________________

Openembedded-core mailing list

[email protected]

http://lists.openembedded.org/mailman/listinfo/openembe
dded-core

#11 lore raw
In reply to Martin Jansa
Quoted 4 lines · Martin Jansa

What about the recipes which don't have ${S}/waf at all (and might inherit waf from possibly wrong reasons), like all those waf-samba recipes mentioned before?

If a recipe inherits waf but doesn't use waf I'm absolutely fine with it erroring out. Its always bothered me that autotools.bbclass doesn't object if configure can't be found.

Ross

#12 lore raw

But shouldn't it at least show different error message in case when ${S}/waf doesn't exist and when it fails to execute it for whatever reason?

Quoted 13 lines · Ross
Quoted 4 lines · Martin Jansa

What about the recipes which don't have ${S}/waf at all (and might inherit waf from possibly wrong reasons), like all those waf-samba recipes mentioned before?

If a recipe inherits waf but doesn't use waf I'm absolutely fine with it erroring out. Its always bothered me that autotools.bbclass doesn't object if configure can't be found.

Ross

#13 lore raw
Quoted 3 lines · Martin Jansa

But shouldn't it at least show different error message in case when ${S}/waf doesn't exist and when it fails to execute it for whatever reason?

Sure, first thing should be to check if S/waf exists and if not, abort.

Ross